<template>
	<view class="page-balance p12">
		<!-- <view class="module-card c255">
			<image src="../../static/image/bg-money.png" style="width: 100%;" mode="widthFix"></image>
			<view class="card-content p16 pt20">
				<view class="u-f-item" @click="toPage('/pages/user/setting/info')">
					<u-avatar size="80" :src="userInfo.avatar"></u-avatar>
					<view class="pl10 u-flex u-f-jsb u-f1">
						<view class="fz14">{{userInfo.name || ''}}</view>
						<u-icon class="fz12" name="arrow-right" color="#fff"></u-icon>


					</view>
				</view>
				<view class="u-flex u-f-jsb mt30">
					<view class="fz16">
						我的业绩
					</view>
					<view class="fz12 u-flex u-f-justify">
						查看业绩详情<u-icon class="fz12" name="arrow-right" color="#fff"></u-icon>
					</view>
				</view>
				<view class="u-flex u-f-jsb fz12 mt18" style="text-align: center;">
					<view>
						<view class="fz18">{{info.client ||0 }}</view>
						邀请客户数
					</view>
					<view>
						<view class="fz18">{{info.thread ||0 }}</view>
						房源线索数
					</view>
					<view>
						<view class="fz18">{{userInfo.totalRecharge ||0 }}</view>
						累计收入（元）
					</view>
				</view>
			</view>
		</view> -->
		<!-- <view class="bg-white p12 mt12">
			<view class="u-flex u-f-jsb fz16" @click="toPage('/pages/user/balance/index')">
				我的钱包<span class="u-flex u-f-justify fz12">
					查看明细<u-icon class="fz12" name="arrow-right" color="#666"></u-icon>
				</span>
			</view>
			<view class="u-flex u-f-jsb p12 mt10" style="background: #F8F8F8;">
				<view>
					<view class="fz20 c3">{{walletInfo.balance || 0}}</view>
					<view class="fz13 c6 mt2">当前余额(元)</view>
				</view>
				<view @click="toPage('/pages/user/balance/withdraw')" class="btn-ti u-flex u-f-justify brs3 c255 fz12">
					提现<u-icon class="fz12 ml3" name="arrow-right" color="#fff"></u-icon></view>
			</view>
		</view> -->
		<!-- <view class="u-flex u-f-jsb mt12">
			<view @click="toPage('/pages/house/my')" class="u-f1 bg-white p14 mr6 u-flex"
				style="box-shadow: 0px 4px 10px 0px rgba(230,219,209,0.25);">
				<image src="../../static/image/ic-fy.png" style="width: 76rpx;height: 76rpx;"></image>
				<view class="u-f1 pl12">
					<view class="fz14 c3">我的房源</view>
					<view class="fz12 c9 mt2">查看房源</view>
				</view>
			</view>
			<view @click="toPage('/pages/invite/index')" class="u-f1 bg-white p14 ml6 u-flex"
				style="box-shadow: 0px 4px 10px 0px rgba(230,219,209,0.25);">
				<image src="../../static/image/ic-qd.png" style="width: 76rpx;height: 76rpx;"></image>
				<view class="u-f1 pl12">
					<view class="fz14 c3">我的渠道</view>
					<view class="fz12 c9 mt2">查看渠道列表</view>
				</view>
			</view>
		</view> -->
		<view class="fz16 c3 mt20">发布房源线索</view>

		<view class="bg-white p12 mt12" v-for="(item,index) in categoryList" :key="index"
			@click="toPage(`/pages/house/add?id=${item.id}&frontDisplayFields=${item.frontDisplayFields}`)">
			<view class="u-flex fz16">
				<image :src="item.systematicIcon" style="width:48rpx;height: 48rpx;" class="mr6"></image>
				{{item.systematicName}}
			</view>
			<view class="u-flex u-f-jsb p12 mt10 fz12 c6" style="background: #F8F8F8;"
			>
			<u-parse :html="item.systematicResume"></u-parse>
			
			</view>

			<view class="btn mt12">去发布</view>
		</view>
		<u-popup v-model="showTips" mode="center" border-radius="10" :closeable="false" :mask-close-able="false">
			<view style="padding: 40rpx 30rpx;width: 600rpx;">
				<view class="u-flex u-f-justify"> <u-icon class="fz30" name="info-circle-fill" color="#E88B8B"></u-icon>
				</view>
				<view v-if="applyStatus==0">
					<view class="fz16 mt20 mb20" style="text-align: center;line-height: 56rpx;">
						您还不是物业管理员<br /> 无法进行查看！</view>
					<view class="btn-sure fz14" @click="toPage('/pages/property/apply')">成为物业管理员</view>
				</view>
				<view v-if="applyStatus==1">
					<view class="fz16 mt20 mb20" style="text-align: center;line-height: 56rpx;">
						您的申请已提交<br /> 请耐心等待！</view>

				</view>
				<view v-if="applyStatus==3">
					<view class="fz16 mt20 mb20" style="text-align: center;line-height: 56rpx;">
						您的申请被驳回</view>
					<view class="btn-sure fz14" @click="toPage('/pages/property/apply')">去查看</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	import {
		getPlatform
	} from '@/config/util.js'
	export default {
		data() {
			return {
				categoryList: [],
				walletInfo: {},
				info: {},
				applyStatus: 0,
				userInfo:{},
				showTips: false,
			};
		},
		methods: {


			toPage(url) {
				uni.navigateTo({
					url
				})
			},
			getInfo() {
				// this.$api.getPerFormance({}, (res) => {
				// 	if (res.code == 200) {
				// 		this.info = res.data
				// 	}
				// })
				// this.$api.getMeWallet({}, (res) => {
				// 	if (res.code == 200) {
				// 		this.walletInfo = res.data
				// 	}
				// })
				this.$api.notifyGetCategoryList({}, (res) => {
					if (res.code == 200) {
						this.categoryList = res.data
					}
				})

				// this.$api.memberInfo({}, res => {
				// 	if (res.code == 200) {
				// 		this.userInfo = res.data;
				// 		if (res.data.memberRole == 1) {

				// 			this.$api.getSubmit({
				// 				role: 2
				// 			}, (res) => {
				// 				if (res.code == 200) {

				// 					if (!res.data) {
				// 						this.showTips = true
				// 						this.applyStatus = 0
				// 					} else {

				// 						if (res.data) {

				// 							this.applyStatus = res.data.auditStatus
				// 							if (this.applyStatus != 2) {

				// 								this.showTips = true
				// 							}
				// 						}
				// 					}
				// 				}
				// 			})

				// 		}
				// 	}
				// })


			},
		},
		onLoad: function() {
			this.getInfo()

		}
	};
</script>

<style lang="scss">
	.btn {
		background: rgba(242, 70, 70, 0.1);
		color: #F24646;

		height: 86upx;
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;
	}

	.module-card {
		position: relative;

		.card-content {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
		}
	}

	.btn-ti {
		background: #F24646;
		padding: 16rpx 40rpx;
	}


	.btn-sure {

		width: 100%;
		height: 88rpx;
		text-align: center;
		color: #fff;
		line-height: 88rpx;
		background: #F24646;

		&.btn-sure1 {
			background: rgba(242, 70, 70, 0.1);
			color: #F24646;
		}
	}
</style>